package com.example.kotlin

/**
 * Created by xiao_tan on 17/7/23.
 */

class Rect(var width: Int, var height: Int)

//静态属性
class Girl(var character: String, var voice: String){
    //动态行为方法
    fun smile(){
        println("妹子笑了...")
    }
    fun cry(){
        println("妹子哭了...")
    }
}

fun main(args: Array<String>) {
    var rect01 = Rect(width = 20, height = 30)
    var rect02 = Rect(40, 50)
    println("矩形的宽度:${rect01.width}")
    println("矩形的高度:${rect01.height}")
    println("矩形的宽:${rect02.width}, 高:${rect02.height}")


    var girl1 = Girl("女汉子", "彪悍")
    println("女子性格:${girl1.character}, 声音:${girl1.voice}")

    girl1.smile()
    girl1.cry()
}